package com.terry.test2.new2.impl;

import com.terry.test2.SendResult;
import com.terry.test2.dp.AuditMessage;
import com.terry.test2.new2.AuditMessageProducer;
import com.terry.test2.old.KafkaTemplate;

/**
 * @author 小八
 * @date 2023年02月02日10:20
 */
public class AuditMessageProducerImpl implements AuditMessageProducer {
    private KafkaTemplate kafkaTemplate;
    private String TOPIC_KAFKA = "TOPIC_KAFKA";


    @Override
    public SendResult send(AuditMessage message) {
        kafkaTemplate.send(TOPIC_KAFKA,message.serialize());
        return SendResult.success();
    }

}
